#include "finddlg.h"
#include "ui_finddlg.h"

FindDlg::FindDlg(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::FindDlg)
{
    ui->setupUi(this);
}

FindDlg::~FindDlg()
{
    delete ui;
}
QString FindDlg::getText() const
{
    return ui->lineEdit->text();
}
void FindDlg::on_findButton_clicked()
{
    QString text = ui->lineEdit->text();
    emit this->findNext(text);
}

void FindDlg::enableFindButton(const QString &text)
{
    ui->findButton->setEnabled(!text.isEmpty());
}

void FindDlg::on_closeButton_clicked()
{
    this->done(0);
}
